package com.demo.query;

import com.demo.utils.SystemConstants;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

@Data
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="QuestionQuery", description="QuestionQuery")
public class QuestionQuery extends PageQuery {
    @ApiModelProperty(value = "关键词")
    private String keyword;

    @ApiModelProperty(value = "用户id")
    private Integer userId;

    public QuestionQuery(String keyword, Integer current) {
        this.keyword = keyword;
        this.setPageSize(SystemConstants.MAX_PAGE_SIZE);
        this.setCurrentPage(current);
    }
}
